]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
lg: add a reference to lookingGlass in the Extensions tab.
authorAlban Crequy <alban.crequy@collabora.co.uk>
Thu, 14 Feb 2013 15:28:43 +0000 (15:28 +0000)
committerAlban Crequy <alban.crequy@collabora.co.uk>
Wed, 20 Feb 2013 23:14:53 +0000 (23:14 +0000)
When the user clicks on "View Source" or "Web Page" in the "Extensions" tab of
looking glass, the callback _onViewSource() or _onWebPage() is called and they
try to close looking glass: this._lookingGlass.close();

But it does not work and generate the exception "this._lookingGlass is
undefined". This patch fixes that.

https://bugzilla.gnome.org/show_bug.cgi?id=693814

js/ui/lookingGlass.js

index f39479bb55b6bd0b28f282b2b56921c326593174..718942eb86292c7972334e6dbdc5c6015493b0da 100644 (file)
@@ -685,7 +685,8 @@ const Memory = new Lang.Class({
 const Extensions = new Lang.Class({
     Name: 'Extensions',
 
-    _init: function() {
+    _init: function(lookingGlass) {
+        this._lookingGlass = lookingGlass;
         this.actor = new St.BoxLayout({ vertical: true,
                                         name: 'lookingGlassExtensions' });
         this._noExtensions = new St.Label({ style_class: 'lg-extensions-none',
@@ -912,7 +913,7 @@ const LookingGlass = new Lang.Class({
         this._memory = new Memory();
         notebook.appendPage('Memory', this._memory.actor);
 
-        this._extensions = new Extensions();
+        this._extensions = new Extensions(this);
         notebook.appendPage('Extensions', this._extensions.actor);
 
         this._entry.clutter_text.connect('activate', Lang.bind(this, function (o, e) {